cancel
( service in module ng
)
Cancels a task associated with the promise
. As a result of this the promise will be
resolved with a rejection.
$timeout#cancel([promise]);
promise(optional) – {Promise=} –
Promise returned by the $timeout
function.
{boolean}
– Returns true
if the task hasn't executed yet and was successfully
canceled.